#include "bits/stdc++.h"

using namespace std;

const int N = 10 + 5;

typedef long long ll;
typedef pair<int, int> PII;

#define CLEAR(x) memset(x, 0, sizeof(x))
#define MSET(x, y) memset(x, y, sizeof(x))

int n, t;
string s;

bool same_ratio(ll di, ll ki, ll dj, ll kj)
{
    return di * kj == dj * ki;
}

int main()
{
    cin >> t;
    while (t--)
    {
        cin >> n >> s;
        s = "#" + s;
        map<PII, int> mp;
        int d = 0, k = 0;
        for (int i = 1; i <= n; i++)
        {
            d += (s[i] == 'D');
            k += (s[i] == 'K');

            int g = __gcd(d, k);
            mp[PII(d/g, k/g)]++;
            cout << mp[PII(d/g, k/g)] << " ";
        }
        cout << endl;
    }
    return 0;
}